package com.cangsan.erhai.common;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler
    public R handler(RuntimeException runtimeException){
        return R.fail(runtimeException.getMessage());
    }
}
